\subsection{Total curvature of a spline surface.}
\funclabel{s2506}
\begin{minipg1}
To compute the total curvature T(u,v) of a surface at
                   given values (u,v) = (parvalue[0],parvalue[1]), where
                   et1[leftknot1] $<=$ parvalue[0] $<$ et1[leftknot1+1] and
                   et2[leftknot2] $<=$ parvalue[1] $<$ et2[leftknot2+1].
\end{minipg1} \\ \\
SYNOPSIS\\
        \>  void s2506(\begin{minipg3}
            {\fov surf},  {\fov ider},  {\fov iside1},  {\fov iside2},  {\fov parvalue},  {\fov leftknot1},  {\fov leftknot2},
	     {\fov totalCurvature},  {\fov jstat})
                \end{minipg3}\\
                \>\>    SISLSurf \> *{\fov surf};\\
                \>\>    int    \>  {\fov ider};\\
                \>\>    int    \>  {\fov iside1};\\
                \>\>    int    \>  {\fov iside2};\\
                \>\>    double \> {\fov parvalue}[\,];\\
                \>\>    int \> *{\fov leftknot1};\\
                \>\>    int \> *{\fov leftknot2};\\
                \>\>    double \> {\fov totalCurvature}[\,];\\
                \>\>    int \> *{\fov jstat};\\
\\
ARGUMENTS\\
	\>Input Arguments:\\
        \>\>    {\fov surf}\> - \>  \begin{minipg2}
                     Pointer to the surface to evaluate.
                               \end{minipg2}\\[0.8ex]
        \>\>    {\fov ider}\> - \>  \begin{minipg2}
                     Number of derivatives to calculate.
                     Only implemented for ider=0.
                               \end{minipg2}\\[0.8ex]
                \>\>\>\>  $< 0$ : \> No derivative calculated.\\
                \>\>\>\>  $= 0$ : \> Position calculated.\\
                \>\>\>\>  $= 1$ : \> Position and first derivative calculated, etc.\\
        \>\>    {\fov iside1}\> - \>  \begin{minipg2}
                     Flag indicating whether the derivatives in the first
                     parameter direction are to be calculated from the
                     left or from the right:
                               \end{minipg2}\\[0.8ex]
         \>\>\>\>  $< 0$  : \> calculate derivative from the left hand side.\\
         \>\>\>\>  $>= 0$ : \> calculate derivative from the right hand side.\\
        \>\>    {\fov iside2}\> - \>  \begin{minipg2}
                     Flag indicating whether the derivatives in the second
                     parameter direction are to be calculated from the
                     left or from the right:
                               \end{minipg2}\\[0.8ex]
         \>\>\>\>  $< 0$  : \> calculate derivative from the left hand side.\\
         \>\>\>\>  $>= 0$ : \> calculate derivative from the right hand side.\\
        \>\>    {\fov parvalue}\> - \>  \begin{minipg2}
                     Parameter value at which to evaluate. Dimension of
                     parvalue is 2.
                               \end{minipg2}\\[0.8ex]
\\
	\>Input/Output Arguments:\\
        \>\>    {\fov leftknot1}\> - \>  \begin{minipg2}
                     Pointer to the interval in the knot vector in the
                     first parameter direction where parvalue[0] is found,
                     that is:
                          et1[leftknot1] $<=$ parvalue[0] $<$ et1[leftknot1+1].
                     leftknot1 should be set equal to zero at the first call
                     to the routine.
                               \end{minipg2}\\[0.8ex]
        \>\>    {\fov leftknot2}\> - \>  \begin{minipg2}
                     Pointer to the interval in the knot vector in the
                     second parameter direction where parvalue[1] is found,
                     that is:
                          et2[leftknot2] $<=$ parvalue[1] $<$ et2[leftknot2+1].
                     leftknot2 should be set equal to zero at the first call
                     to the routine.
                               \end{minipg2}\\[0.8ex]
\\
	\>Output Arguments:\\
        \>\>    {\fov totalCurvature}\> - \>  \begin{minipg2}
                     Total curvature of the surface at (u,v) $=$
                     (parvalue[0],parvalue[1]).
                               \end{minipg2}\\[0.8ex]
        \>\>    {\fov jstat}     \> - \> Status messages\\
                \>\>\>\> $= 2$ : 
                       \> \begin{minipg5}  
                               Surface is degenerate at the point, that is,
                               the surface is not regular at this point.
                               \end{minipg5}\\[0.8ex]
                \>\>\>\>  $= 1$ :
                       \> \begin{minipg5}  
                               Surface is close to degenerate at the point.
                               Angle between tangents is less than the angular
                               tolerance.
                               \end{minipg5}\\[0.8ex]
                \>\>\>\> $= 0$ : \> Ok.\\
                \>\>\>\> $< 0$ : \> Error.\\
\\
EXAMPLE OF USE\\
		\>      \{ \\

                \>\>    SISLSurf \> *{\fov surf}; \, /* Must be defined */\\
                \>\>    int    \>  {\fov ider} = 0;\\
                \>\>    int    \>  {\fov iside1} = 1;\\
                \>\>    int    \>  {\fov iside2} = 1;\\
                \>\>    double \> {\fov parvalue}[2] \, /* Must be defined */;\\
                \>\>    int \> {\fov leftknot1} = 0; /* Define initially as zero. For consequtive evaluations\\
                \>\>\>\>\>\> leave leftknot1 as returned from s1506 */\\
                \>\>    int \> {\fov leftknot2} = 0; /* As for leftknot1 */ \\
                \>\>    double \> {\fov totalCurvature}[1]; /* A pre allocated array is expected */\\
                \>\>    int \> {\fov jstat} = 0;\\                \>\>    \ldots \\
        \> \>s2506(\begin{minipg4}
            {\fov surf},  {\fov ider},  {\fov iside1},  {\fov iside2},  {\fov parvalue},  {\fov leftknot1},  {\fov leftknot2},
	     {\fov totalCurvature},  \&{\fov jstat});
                \end{minipg4}\\
                \>\>    \ldots \\
		\>      \}
\end{tabbing}
